import 'package:flutter/material.dart';
import 'package:get/get.dart';

///失败后的重试widget
class RequestRetryDialog extends StatelessWidget {
  const RequestRetryDialog({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Dialog(
      child: Card(
        child: Column(
          mainAxisSize: MainAxisSize.min,
          children: [
            const Text("加载失败啦"),
            const SizedBox(height: 20),
            MaterialButton(
              onPressed: () {
                Get.back(result: true);
              },
              child: const Padding(
                padding: EdgeInsets.all(8.0),
                child: Text("点击重试"),
              ),
            )
          ],
        ),
      ),
    );
  }
}
